export default [
  {
    path: '/user',
    layout: false,
    routes: [
      { path: '/user', routes: [{ name: '登录', path: '/user/login', component: './user/Login' }] },
    ],
  },
  { path: '/welcome', name: '仪表盘', icon: 'smile', component: './Welcome' },

  {
    path: '/admin',
    name: '管理页',
    icon: 'crown',
    access: 'canAdmin',
    component: './Admin',
    routes: [
      { path: '/admin/sub-page', name: '二级管理页', icon: 'smile', component: './Welcome' },
    ],
  },
  {
    path: '/setting',
    name: '系统设置',
    icon: 'smile',
    routes: [
      { name: '用户管理', icon: 'table', path: '/setting/user', component: './setting/user' },
      {
        name: '部门管理',
        icon: 'table',
        path: '/setting/department',
        component: './setting/department',
      },
      { name: '菜单管理', icon: 'table', path: '/setting/menu', component: './setting/menu' },
      { name: '角色管理', icon: 'table', path: '/setting/role', component: './setting/role' },
      {
        name: '权限管理',
        icon: 'table',
        path: '/setting/authority',
        component: './setting/authority',
      },
      { name: '日志管理', icon: 'table', path: '/setting/log', component: './setting/log' },
    ],
  },
  { path: '/', redirect: '/welcome' },
  { component: './404' },
];
